# active AOF
sed -i 's/^appendonly.*/appendonly yes/g' /usr/local/redis/etc/redis.conf
sed -i 's/^no-appendfsync-on-rewrite.*/no-appendfsync-on-rewrite yes/g' /usr/local/redis/etc/redis.conf
# activedefrag
sed -i 's/# activedefrag yes/activedefrag yes/g' /usr/local/redis/etc/redis.conf
sed -i 's/# active-defrag-ignore-bytes 100mb/active-defrag-ignore-bytes 100mb/g' /usr/local/redis/etc/redis.conf
sed -i 's/# active-defrag-threshold-lower 10/active-defrag-threshold-lower 10/g' /usr/local/redis/etc/redis.conf
sed -i 's/# active-defrag-threshold-upper 100/active-defrag-threshold-upper 100/g' /usr/local/redis/etc/redis.conf
sed -i 's/# active-defrag-cycle-min 5/active-defrag-cycle-min 5/g' /usr/local/redis/etc/redis.conf
sed -i 's/# active-defrag-cycle-max 75/active-defrag-cycle-max 75/g' /usr/local/redis/etc/redis.conf
# maxmemory-policy
sed -i 's/# maxmemory-policy noeviction/# maxmemory-policy noeviction\nmaxmemory-policy volatile-lru/g' /usr/local/redis/etc/redis.conf

